package com.gopay.common.domain.bank.route.po.pay;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @description  网联付款通道切换规则
 * @author jianghp
 * @date 2018/5/23 14:48
 * Copyright (c) 2018. www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "PAY_NUCC_RULES")
public class PayNuccRules extends BaseEntity {

    private static final long serialVersionUID = -1558261323540674271L;

    @Id
    @SequenceGenerator(name = "payNuccRulesSeq", sequenceName = "PAY_NUCC_RULES_SEQ" ,allocationSize=1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "payNuccRulesSeq")
    @Column(name = "ID", unique = true, nullable = false)
    private Long id;

    @Column(name = "CHANNEL_ID")
    private Long channelId;

    @Column(name = "RULE_NAME")
    private String ruleName;

    @Column(name = "IS_VALID")
    private String isValid;

    @Column(name = "PAY_BANK_CODE")
    private String payBankCode;

    @Column(name = "MIN_AMT")
    private BigDecimal minAmt;

    @Column(name = "MAX_AMT")
    private BigDecimal maxAmt;

    @Column(name = "WH_FLAG")
    private String whFlag;

    @Column(name = "START_TIME")
    private String startTime;

    @Column(name = "END_TIME")
    private String endTime;

    @Column(name = "ROLLBACK_FLAG")
    private String rollbackFlag;

    @Column(name = "DEL_FLAG")
    private String delFlag;

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdTs;

    @Column(name = "UPDATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedTs;

    @Column(name = "VERSION")
    @Version
    private Integer version;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    public String getIsValid() {
        return isValid;
    }

    public void setIsValid(String isValid) {
        this.isValid = isValid;
    }

    public String getPayBankCode() {
        return payBankCode;
    }

    public void setPayBankCode(String payBankCode) {
        this.payBankCode = payBankCode;
    }

    public BigDecimal getMinAmt() {
        return minAmt;
    }

    public void setMinAmt(BigDecimal minAmt) {
        this.minAmt = minAmt;
    }

    public BigDecimal getMaxAmt() {
        return maxAmt;
    }

    public void setMaxAmt(BigDecimal maxAmt) {
        this.maxAmt = maxAmt;
    }

    public String getWhFlag() {
        return whFlag;
    }

    public void setWhFlag(String whFlag) {
        this.whFlag = whFlag;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getRollbackFlag() {
        return rollbackFlag;
    }

    public void setRollbackFlag(String rollbackFlag) {
        this.rollbackFlag = rollbackFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public Date getUpdatedTs() {
        return updatedTs;
    }

    public void setUpdatedTs(Date updatedTs) {
        this.updatedTs = updatedTs;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
